package com.cy.service.config;

import com.cy.service.RemoteProviderService;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class HystrixClientFactory implements FallbackFactory<RemoteProviderService> {
    private static final Logger logger = LoggerFactory.getLogger(HystrixClientFactory.class);
    @Override
    public RemoteProviderService create(Throwable throwable) {
        return (msg)-> "服务端报错了,请您稍等片刻";

    }
}
